package com.punch.common.vo.order;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @className: OrderAppDetailVO
 * @description: APP端订单详情
 * @author: wujj
 * @date: 2020/12/13 16:32
 **/
@Data
public class OrderAppDetailVO implements Serializable {

    /**
     * 主订单id
     */
    @ApiModelProperty(name = "orderId", notes = "主订单id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long orderId;

    /**
     * 订单编号
     */
    @ApiModelProperty(name = "orderNo", notes = "订单编号")
    private String orderSN;


    @ApiModelProperty(name = "createTime", notes = "订单创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 订单总金额
     */
    @ApiModelProperty(name = "totalAmount", notes = "订单总金额")
    private Integer totalAmount;

    @ApiModelProperty(name = "payType", notes = "支付方式 0-无 1-支付宝 2-微信")
    private String payType;


    @ApiModelProperty(name = "courseClassVO", notes = "课程班级信息")
    private CourseClassVO courseClassVO;

    @ApiModelProperty(name = "courseGoodsVO", notes = "教具商品信息,为空则不显示教具商品信息")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private CourseGoodsVO courseGoodsVO;
}
